import {request} from '@/utils/request.js'

/**
 * 中心站简介 API JS
 */

export default {
    /**
     * 值班表
     * @param params
     * @returns {*}
     */
    getList(params = {}) {
        return request({
            url: 'temblor/beonduty/dutyRoster',
            method: 'get',
            params
        })
    },
    statistics(params = {}) {
        return request({
            url: 'temblor/beonduty/statistics',
            method: 'get',
            params
        })
    },
    /**
     * 申请换班
     * @param params
     * @returns {*}
     */
    applyShiftChange(params = {}) {
        return request({
            url: 'temblor/beonduty/applyShiftChange',
            method: 'post',
            data: params
        })
    },
    /**
     * 获取用户可换班列表
     * @param params
     * @returns {*}
     */
    userBeonduty(params = {}) {
        return request({
            url: 'temblor/beonduty/userBeonduty',
            method: 'get',
            params
        })
    },
    /**
     * 换班申请列表
     * @param params
     * @returns {*}
     */
    shiftList(params = {}) {
        return request({
            url: 'temblor/shift/list',
            method: 'get',
            params
        })
    },
    /** 新建值班模板 sword 1*/
    createDutyTemplate(data = {}) {
        return request({
            url: 'temblor/beonduty/createTemplate',
            method: 'post',
            data
        })
    },
    /** 保存值班表   */
    submitDutyRoster(data = {}) {
        return request({
            url: 'temblor/beonduty/saveDutyRoster',
            method: 'post',
            data
        })
    },
    /**
     * 同意换班
     * @param params
     * @returns {*}
     */
    agreeShift(params = {}) {
        return request({
            url: 'temblor/shift/agreeShift',
            method: 'post',
            params
        })
    },
    /**
     * 设置提醒时间
     * @param params
     * @returns {*}
     */
    setReminder(params = {}) {
        return request({
            url: 'temblor/reminder/set',
            method: 'post',
            data: params
        })
    },
    /**
     * 获取提醒时间
     * @param params
     * @returns {*}
     */
    getReminder(params = {}) {
        return request({
            url: 'temblor/reminder/get',
            method: 'get',
            params
        })
    },
    importZb(data = {}) {
        return request({
            url: 'temblor/beonduty/import',
            method: 'post',
            data
        })
    },

}
